{$contents}

{literal}
<div style="text-align:left; padding:10px;">

<h2>filebrowser source</h2>
This code should be put somewhere into your sites public folder. This will be the index script for popup.<br>
For example <b>yoursite.com/fileBrowser.php</b>. <b>fileBrowserUrl</b> value must be the url location of that file.<br>
<pre class="code">
&lt;?php
session_start();
require('conf/runtime.conf.php');
require( DOM_PATH . 'Dom.init.php');

$manager = new DomFgFileBrowserPopUp();
$manager-&gt;display();
?&gt;
</pre>


<h2>Source</h2>

<pre class="code">
&lt;?php
$this-&gt;view-&gt;addPartitioner('contents', 'DomFg/Source/FileBrowser.html');
		
$post = DomFgPost::getInstance();
if( $post-&gt;save ) {
	$message = array(
		'type' =&gt; 'info',
		'colspan' =&gt; 3,
		'message' =&gt; 'Added file',
		'description' =&gt; 'Path: &lt;b&gt;'.$post-&gt;file[0].'&lt;/b&gt; &lt;br&gt; filename:&lt;b&gt;'.$post-&gt;file[1].'&lt;/b&gt;',
	);
}

$panel = array(
	'title' =&gt; 'File browser',
	'layout' =&gt; 'table',
	'layoutConfig' =&gt; array(
		'columns' =&gt; 3,
	),
	'style' =&gt; 'width:500px',
	'action' =&gt; $this-&gt;getUrl('fileBrowser'),
	'items' =&gt; array(
		$message,
		array(
			'type' =&gt; 'fileBrowser',
			'fileBrowserUrl' =&gt; SITE_URL.'/fileBrowser.php',
			'title' =&gt; 'Server file',
			'name' =&gt; 'file',
			'rootPath' =&gt; 'C:/',
			'allowedTypes' => array('__folders'=>true,'__allFiles'=>true, 'jpg'=>true),
		),
		array(
			'type' =&gt; 'button',
			'title' =&gt; 'Save',
			'name' =&gt; 'save',
		),
	),	
);
$this-&gt;view-&gt;contents = DomFg::render( $panel );
?&gt;
</pre>
</div>
{/literal}